ci: T8490: typos.yml + central _typos.toml (ruleset-required pilot)#150
Conversation
Add `.github/workflows/typos.yml` — a new standalone CI workflow that runs crate-ci/typos against pull_request branches (rolling/circinus/sagitta). Workflow design: - Two-step checkout: PR code into workspace, vyos/.github@production into `.github-central/` so the central config is always sourced from the authoritative repo regardless of which product repo runs the check. - SHA-pinned actions (actions/checkout v7, crate-ci/typos v1.47.2, peter-evans/create-or-update-comment v5). - Failure comment injected only on same-repo (non-fork) PRs to avoid pull_request_target exposure on forks. Add `_typos.toml` at repo root — the central allowlist consumed by the two-checkout pattern above. Config excludes upstream-owned paths (*.patch, smoketest/**, mibs/**, kernel config fragments) and carries extend-words entries for confirmed VyOS / networking / kernel jargon: ICMPv6 ND prefixes, IEEE 802.11ai FILS/EDCA ACI/OCE/SME, MACsec pn, GeoIP country codes (ba/fo), VyOS daemon suffix (commitd), _OFR_CONFIGURE bash env, Linux UAPI FlAGS kernel identifiers (AGS), Triple-DES EDE, RTAX_RTO_MIN (RTO/rto), nftables bridge chain prefix (NAM), Linux kernel driver symbols (DAMON/WIL/EXPORTFS/SYNOPSYS/ADIN), QoS thr threshold, setpriv --inh-caps (inh), VyOS dummy interface prefix (dum), ATA node prefix (hda), gratuitous-ARP abbreviation (grat), and the op-mode tab-completion prefix file (clea). Dry-run against 4 pilot repos (vyos-1x/vyos-build/vyatta-cfg-system/vyconf): - vyos-1x: 742 → 75 hits (90 % reduction) - vyos-build: 138 → 1 hit (99 % reduction) - vyatta-cfg-system: 81 → 67 hits (17 % reduction — repo has real typos) - vyconf: 36 → 14 hits (61 % reduction) All remaining hits are genuine typos in product source, not false positives. This is the Phase 1.3/1.4 seed. Phase 2 evaluate step will measure false positives on live PRs and tune further; zero false positives is not the goal here. Relates: T8490 🤖 Generated by [robots](https://vyos.io)
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Central YAML (inherited), Organization UI (inherited) Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
🔗 Linked repositories identifiedCodeRabbit considers these linked repositories for cross-repo context during reviews:
📜 Recent review details🧰 Additional context used📓 Path-based instructions (2).github/workflows/**/*.yml📄 CodeRabbit inference engine (AGENTS.md)
Files:
.github/workflows/**⚙️ CodeRabbit configuration file
Files:
🧠 Learnings (1)📚 Learning: 2026-05-30T19:50:14.606ZApplied to files:
🔍 Remote MCP Context7Summary of Additional Context for PR ReviewTypos Action Capabilities and ConfigurationThe Configuration Precedence: Configuration is loaded in order: command line arguments, a file specified via Action Design CharacteristicsThe typos tool is "fast enough to run on monorepos" and has "low false positives so you can run on PRs". The action creates GitHub annotations directly in the pull request interface, displaying typos as warnings with file, line number, and suggested corrections. For production environments, it's recommended to use a specific version tag to avoid unexpected failures from new spell checking rules. Configuration ManagementThe typos tool makes it relatively easy to modify its sensitivity by editing the typos.toml file to ignore some words or patterns, which aligns with the PR's strategy of maintaining a central allowlist for domain-specific VyOS terminology. ****, ****, (https://github.com/crate-ci/typos/blob/master/docs/github-action.md) 🔇 Additional comments (2)
📝 WalkthroughSummary by CodeRabbit
WalkthroughAdds ChangesCentralized Typos CI Workflow
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches✨ Simplify code
Comment |
What
Adds a standalone, fork-safe
typos.ymlworkflow plus a central_typos.tomlallowlist tovyos/.github. This workflow is designed to be required fleet-wide via a GitHub repository ruleset (type: workflows) on a pilot set of repos — no per-repo caller files.Why standalone
on: pull_request(not aworkflow_callreusable)A
workflow_call-only reusable cannot be a ruleset-required workflow — GitHub's "require workflows via rulesets" requires a directly PR-triggered file. So this intentionally diverges from the reusable+wrapper pattern: the whole point is to enforce the check centrally without a per-repo caller in every product repo.Design
vyos/.github@productioninto.github-central/, so the allowlist is always sourced from the authoritative protected branch regardless of which product repo runs the check.--config .github-central/_typos.toml). The pilot is central-config-only (no repo-local override) — that removes the same-PR config-relaxation vector, since the config lives in the protectedproductionbranch.crate-ci/typosprebuilt binary (drops the oldcargo install), all actions SHA-pinned (incl.bullfrogsec/bullfrogegress-audit, per repo convention),persist-credentials: falseon both checkouts.typosdefaults toignore-hidden = true, so dot-prefixed dirs (incl. the.github-central/checkout and each repo's own.github/) are not scanned. This is intentional/acceptable — it also means the central-config checkout never cross-contaminates a product PR's result._typos.toml(seed)Excludes upstream-owned paths (
*.patch,smoketest/**,mibs/**, kernel config fragments) and allowlists confirmed VyOS / networking / kernel jargon (ICMPv6 ND, 802.11ai FILS/ACI/OCE/SME, MACsec pn, GeoIP country codes,commitd, kernelCONFIG_*driver symbols, 3DES EDE, etc.). Dry-run reductions: vyos-1x 742→75, vyos-build 138→1, vyatta-cfg-system 81→67, vyconf 36→14. This is a Phase-1 seed; the rollout's evaluate phase tunes it to a clean baseline before enforcement is made blocking.Rollout
After merge: an org ruleset requires this workflow on
vyos-1x/vyos-build/vyatta-cfg-system/vyconfforrolling/circinus/sagitta, rolled out evaluate → active. The legacy per-repovyos-1xcaller + the oldworkflow_callreusable + custom scripts are then retired.Relates: T8490